package com.hm.jiaowuxitong.dao;

import com.hm.jiaowuxitong.util.DBUtil;

import java.util.List;
import java.util.Map;

public class GradeDaoImp implements IGradeDao {

    @Override
    public int insertGrade(Map<String, Object> oMap) {
        return DBUtil.jt.update("insert into 成绩表 values(?,?,?)",
                new Object[]{

                        oMap.get("personId"),
                        oMap.get("name"),
                        oMap.get("age"),

                });
    }

    @Override
    public List<Map<String, Object>> selectGrades() {
        return DBUtil.jt.queryForList("select * from 成绩表");
    }

    @Override
    public List<Map<String, Object>> selectGrades1(String id) {
        return DBUtil.jt.queryForList("select * from 成绩表 where 学号=?",id);
    }
}
